<template>
  <div class="city">
    <city-header></city-header>
    <city-list :city='city' :hotCities='hotCities'></city-list>
  </div>
</template>

<script>
  import CityHeader from './pages/Header'
  import CityList from './pages/List'
  export default{
    components:{
      CityHeader,
      CityList
    },
    data(){
    	return{
        hotCities:[],
    		city:[]
    	}
    },
    mounted(){
    	this.$http.get('/api/city.json').then( (res)=>{
    		const msg = res.data.data[0];
    		this.city = msg.city;
        this.hotCities = msg.hotCities;
    	})
    }
  }
</script>

<style scoped>
  .city{
    background-color: #f5f5f5;
  }
</style>
